package control;

import base.util.BeanUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableAsync;

/**
 * App
 *
 * @description:
 * @author: cyj
 * @date 2020 -10-26 08:49:22
 */
@SpringBootApplication(scanBasePackages = {"control.*", "base.*"})
@MapperScan("control.mapper")
@EnableRetry
@EnableAsync
public class App implements CommandLineRunner {

    /**
     * Main
     *
     * @param args args
     * @description:
     */
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(App.class, args);
        BeanUtil.setApplicationContext(applicationContext);
    }

    @Override
    public void run(String... strings) throws Exception {
        System.out.println("------simpile启动完毕------");
    }
}